#include<iostream>
#include<functional>
using namespace std;

class CTest
{
public:
	CTest(void) : value(1023){cout<< "Constructor.\n";}
	~CTest(void)
	{
		cout<< "Destructor, my value is: " << value << "\n";
		if (0 != value)
		{
			cout<< "Destructor a non-empty object\n";
		}
	}
	CTest(const CTest& r)
	{
		cout<< "Copy Constructor\n";
		value = r.value;
	}
	CTest(CTest&& rr)
	{
		cout<< "Move Constructor\n";
		value = rr.value;
		rr.value = 0;
	}
	CTest(int&& t)
	{
		value = t;
		t = -1;
	}
private:
	int value;
};

int main(void)
{
	int a = 1234;
	CTest t(move(a));
	cout<< a <<endl;
	
	
	return 0;
}
